#pragma once


#if USE_BVH
#include "../../../../dependencies/RGBDAcquisition/opengl_acquisition_shared_library/opengl_depth_and_color_renderer/src/Library/MotionCaptureLoader/bvh_loader.h"
#include "../../../../dependencies/RGBDAcquisition/opengl_acquisition_shared_library/opengl_depth_and_color_renderer/src/Library/MotionCaptureLoader/calculate/bvh_transform.h"
#endif // USE_BVH

#include <stdio.h>
#include <stdlib.h>
  

static const char * skeletonSerializedNames[]=
{
 "frameNumber",
 "skeletonID",
 "totalSkeletons",
 "2dx_head",
 "2dy_head",
 "visible_head",
 "2dx_neck",
 "2dy_neck",
 "visible_neck",
 "2dx_rshoulder",
 "2dy_rshoulder",
 "visible_rshoulder",
 "2dx_relbow",
 "2dy_relbow",
 "visible_relbow",
 "2dx_rhand",
 "2dy_rhand",
 "visible_rhand",
 "2dx_lshoulder",
 "2dy_lshoulder",
 "visible_lshoulder",
 "2dx_lelbow",
 "2dy_lelbow",
 "visible_lelbow",
 "2dx_lhand",
 "2dy_lhand",
 "visible_lhand",
 "2dx_hip",
 "2dy_hip",
 "visible_hip",
 "2dx_rhip",
 "2dy_rhip",
 "visible_rhip",
 "2dx_rknee",
 "2dy_rknee",
 "visible_rknee",
 "2dx_rfoot",
 "2dy_rfoot",
 "visible_rfoot",
 "2dx_lhip",
 "2dy_lhip",
 "visible_lhip",
 "2dx_lknee",
 "2dy_lknee",
 "visible_lknee",
 "2dx_lfoot",
 "2dy_lfoot",
 "visible_lfoot",
 "2dx_endsite_eye.r",
 "2dy_endsite_eye.r",
 "visible_endsite_eye.r",
 "2dx_endsite_eye.l",
 "2dy_endsite_eye.l",
 "visible_endsite_eye.l",
 "2dx_rear",
 "2dy_rear",
 "visible_rear",
 "2dx_lear",
 "2dy_lear",
 "visible_lear",
 "2dx_endsite_toe1-2.l",
 "2dy_endsite_toe1-2.l",
 "visible_endsite_toe1-2.l",
 "2dx_endsite_toe5-3.l",
 "2dy_endsite_toe5-3.l",
 "visible_endsite_toe5-3.l",
 "2dx_lheel",
 "2dy_lheel",
 "visible_lheel",
 "2dx_endsite_toe1-2.r",
 "2dy_endsite_toe1-2.r",
 "visible_endsite_toe1-2.r",
 "2dx_endsite_toe5-3.r",
 "2dy_endsite_toe5-3.r",
 "visible_endsite_toe5-3.r",
 "2dx_rheel",
 "2dy_rheel",
 "visible_rheel",
 "2dx_bkg",
 "2dy_bkg",
 "visible_bkg",
 "2dx_lhand",
 "2dy_lhand",
 "visible_lhand",
 "2dx_lthumb",
 "2dy_lthumb",
 "visible_lthumb",
 "2dx_finger1-2.l",
 "2dy_finger1-2.l",
 "visible_finger1-2.l",
 "2dx_finger1-3.l",
 "2dy_finger1-3.l",
 "visible_finger1-3.l",
 "2dx_endsite_finger1-3.l",
 "2dy_endsite_finger1-3.l",
 "visible_endsite_finger1-3.l",
 "2dx_finger2-1.l",
 "2dy_finger2-1.l",
 "visible_finger2-1.l",
 "2dx_finger2-2.l",
 "2dy_finger2-2.l",
 "visible_finger2-2.l",
 "2dx_finger2-3.l",
 "2dy_finger2-3.l",
 "visible_finger2-3.l",
 "2dx_endsite_finger2-3.l",
 "2dy_endsite_finger2-3.l",
 "visible_endsite_finger2-3.l",
 "2dx_finger3-1.l",
 "2dy_finger3-1.l",
 "visible_finger3-1.l",
 "2dx_finger3-2.l",
 "2dy_finger3-2.l",
 "visible_finger3-2.l",
 "2dx_finger3-3.l",
 "2dy_finger3-3.l",
 "visible_finger3-3.l",
 "2dx_endsite_finger3-3.l",
 "2dy_endsite_finger3-3.l",
 "visible_endsite_finger3-3.l",
 "2dx_finger4-1.l",
 "2dy_finger4-1.l",
 "visible_finger4-1.l",
 "2dx_finger4-2.l",
 "2dy_finger4-2.l",
 "visible_finger4-2.l",
 "2dx_finger4-3.l",
 "2dy_finger4-3.l",
 "visible_finger4-3.l",
 "2dx_endsite_finger4-3.l",
 "2dy_endsite_finger4-3.l",
 "visible_endsite_finger4-3.l",
 "2dx_finger5-1.l",
 "2dy_finger5-1.l",
 "visible_finger5-1.l",
 "2dx_finger5-2.l",
 "2dy_finger5-2.l",
 "visible_finger5-2.l",
 "2dx_finger5-3.l",
 "2dy_finger5-3.l",
 "visible_finger5-3.l",
 "2dx_endsite_finger5-3.l",
 "2dy_endsite_finger5-3.l",
 "visible_endsite_finger5-3.l",
 "2dx_rhand",
 "2dy_rhand",
 "visible_rhand",
 "2dx_rthumb",
 "2dy_rthumb",
 "visible_rthumb",
 "2dx_finger1-2.r",
 "2dy_finger1-2.r",
 "visible_finger1-2.r",
 "2dx_finger1-3.r",
 "2dy_finger1-3.r",
 "visible_finger1-3.r",
 "2dx_endsite_finger1-3.r",
 "2dy_endsite_finger1-3.r",
 "visible_endsite_finger1-3.r",
 "2dx_finger2-1.r",
 "2dy_finger2-1.r",
 "visible_finger2-1.r",
 "2dx_finger2-2.r",
 "2dy_finger2-2.r",
 "visible_finger2-2.r",
 "2dx_finger2-3.r",
 "2dy_finger2-3.r",
 "visible_finger2-3.r",
 "2dx_endsite_finger2-3.r",
 "2dy_endsite_finger2-3.r",
 "visible_endsite_finger2-3.r",
 "2dx_finger3-1.r",
 "2dy_finger3-1.r",
 "visible_finger3-1.r",
 "2dx_finger3-2.r",
 "2dy_finger3-2.r",
 "visible_finger3-2.r",
 "2dx_finger3-3.r",
 "2dy_finger3-3.r",
 "visible_finger3-3.r",
 "2dx_endsite_finger3-3.r",
 "2dy_endsite_finger3-3.r",
 "visible_endsite_finger3-3.r",
 "2dx_finger4-1.r",
 "2dy_finger4-1.r",
 "visible_finger4-1.r",
 "2dx_finger4-2.r",
 "2dy_finger4-2.r",
 "visible_finger4-2.r",
 "2dx_finger4-3.r",
 "2dy_finger4-3.r",
 "visible_finger4-3.r",
 "2dx_endsite_finger4-3.r",
 "2dy_endsite_finger4-3.r",
 "visible_endsite_finger4-3.r",
 "2dx_finger5-1.r",
 "2dy_finger5-1.r",
 "visible_finger5-1.r",
 "2dx_finger5-2.r",
 "2dy_finger5-2.r",
 "visible_finger5-2.r",
 "2dx_finger5-3.r",
 "2dy_finger5-3.r",
 "visible_finger5-3.r",
 "2dx_endsite_finger5-3.r",
 "2dy_endsite_finger5-3.r",
 "visible_endsite_finger5-3.r",
 "2dx_head_rchin_0",
 "2dy_head_rchin_0",
 "visible_head_rchin_0",
 "2dx_head_rchin_1",
 "2dy_head_rchin_1",
 "visible_head_rchin_1",
 "2dx_head_rchin_2",
 "2dy_head_rchin_2",
 "visible_head_rchin_2",
 "2dx_head_rchin_3",
 "2dy_head_rchin_3",
 "visible_head_rchin_3",
 "2dx_head_rchin_4",
 "2dy_head_rchin_4",
 "visible_head_rchin_4",
 "2dx_head_rchin_5",
 "2dy_head_rchin_5",
 "visible_head_rchin_5",
 "2dx_head_rchin_6",
 "2dy_head_rchin_6",
 "visible_head_rchin_6",
 "2dx_head_rchin_7",
 "2dy_head_rchin_7",
 "visible_head_rchin_7",
 "2dx_head_chin",
 "2dy_head_chin",
 "visible_head_chin",
 "2dx_head_lchin_7",
 "2dy_head_lchin_7",
 "visible_head_lchin_7",
 "2dx_head_lchin_6",
 "2dy_head_lchin_6",
 "visible_head_lchin_6",
 "2dx_head_lchin_5",
 "2dy_head_lchin_5",
 "visible_head_lchin_5",
 "2dx_head_lchin_4",
 "2dy_head_lchin_4",
 "visible_head_lchin_4",
 "2dx_head_lchin_3",
 "2dy_head_lchin_3",
 "visible_head_lchin_3",
 "2dx_head_lchin_2",
 "2dy_head_lchin_2",
 "visible_head_lchin_2",
 "2dx_head_lchin_1",
 "2dy_head_lchin_1",
 "visible_head_lchin_1",
 "2dx_head_lchin_0",
 "2dy_head_lchin_0",
 "visible_head_lchin_0",
 "2dx_head_reyebrow_0",
 "2dy_head_reyebrow_0",
 "visible_head_reyebrow_0",
 "2dx_head_reyebrow_1",
 "2dy_head_reyebrow_1",
 "visible_head_reyebrow_1",
 "2dx_head_reyebrow_2",
 "2dy_head_reyebrow_2",
 "visible_head_reyebrow_2",
 "2dx_head_reyebrow_3",
 "2dy_head_reyebrow_3",
 "visible_head_reyebrow_3",
 "2dx_head_reyebrow_4",
 "2dy_head_reyebrow_4",
 "visible_head_reyebrow_4",
 "2dx_head_leyebrow_4",
 "2dy_head_leyebrow_4",
 "visible_head_leyebrow_4",
 "2dx_head_leyebrow_3",
 "2dy_head_leyebrow_3",
 "visible_head_leyebrow_3",
 "2dx_head_leyebrow_2",
 "2dy_head_leyebrow_2",
 "visible_head_leyebrow_2",
 "2dx_head_leyebrow_1",
 "2dy_head_leyebrow_1",
 "visible_head_leyebrow_1",
 "2dx_head_leyebrow_0",
 "2dy_head_leyebrow_0",
 "visible_head_leyebrow_0",
 "2dx_head_nosebone_0",
 "2dy_head_nosebone_0",
 "visible_head_nosebone_0",
 "2dx_head_nosebone_1",
 "2dy_head_nosebone_1",
 "visible_head_nosebone_1",
 "2dx_head_nosebone_2",
 "2dy_head_nosebone_2",
 "visible_head_nosebone_2",
 "2dx_head_nosebone_3",
 "2dy_head_nosebone_3",
 "visible_head_nosebone_3",
 "2dx_head_nostrills_0",
 "2dy_head_nostrills_0",
 "visible_head_nostrills_0",
 "2dx_head_nostrills_1",
 "2dy_head_nostrills_1",
 "visible_head_nostrills_1",
 "2dx_head_nostrills_2",
 "2dy_head_nostrills_2",
 "visible_head_nostrills_2",
 "2dx_head_nostrills_3",
 "2dy_head_nostrills_3",
 "visible_head_nostrills_3",
 "2dx_head_nostrills_4",
 "2dy_head_nostrills_4",
 "visible_head_nostrills_4",
 "2dx_head_reye_0",
 "2dy_head_reye_0",
 "visible_head_reye_0",
 "2dx_head_reye_1",
 "2dy_head_reye_1",
 "visible_head_reye_1",
 "2dx_head_reye_2",
 "2dy_head_reye_2",
 "visible_head_reye_2",
 "2dx_head_reye_3",
 "2dy_head_reye_3",
 "visible_head_reye_3",
 "2dx_head_reye_4",
 "2dy_head_reye_4",
 "visible_head_reye_4",
 "2dx_head_reye_5",
 "2dy_head_reye_5",
 "visible_head_reye_5",
 "2dx_head_leye_0",
 "2dy_head_leye_0",
 "visible_head_leye_0",
 "2dx_head_leye_1",
 "2dy_head_leye_1",
 "visible_head_leye_1",
 "2dx_head_leye_2",
 "2dy_head_leye_2",
 "visible_head_leye_2",
 "2dx_head_leye_3",
 "2dy_head_leye_3",
 "visible_head_leye_3",
 "2dx_head_leye_4",
 "2dy_head_leye_4",
 "visible_head_leye_4",
 "2dx_head_leye_5",
 "2dy_head_leye_5",
 "visible_head_leye_5",
 "2dx_head_outmouth_0",
 "2dy_head_outmouth_0",
 "visible_head_outmouth_0",
 "2dx_head_outmouth_1",
 "2dy_head_outmouth_1",
 "visible_head_outmouth_1",
 "2dx_head_outmouth_2",
 "2dy_head_outmouth_2",
 "visible_head_outmouth_2",
 "2dx_head_outmouth_3",
 "2dy_head_outmouth_3",
 "visible_head_outmouth_3",
 "2dx_head_outmouth_4",
 "2dy_head_outmouth_4",
 "visible_head_outmouth_4",
 "2dx_head_outmouth_5",
 "2dy_head_outmouth_5",
 "visible_head_outmouth_5",
 "2dx_head_outmouth_6",
 "2dy_head_outmouth_6",
 "visible_head_outmouth_6",
 "2dx_head_outmouth_7",
 "2dy_head_outmouth_7",
 "visible_head_outmouth_7",
 "2dx_head_outmouth_8",
 "2dy_head_outmouth_8",
 "visible_head_outmouth_8",
 "2dx_head_outmouth_9",
 "2dy_head_outmouth_9",
 "visible_head_outmouth_9",
 "2dx_head_outmouth_10",
 "2dy_head_outmouth_10",
 "visible_head_outmouth_10",
 "2dx_head_outmouth_11",
 "2dy_head_outmouth_11",
 "visible_head_outmouth_11",
 "2dx_head_inmouth_0",
 "2dy_head_inmouth_0",
 "visible_head_inmouth_0",
 "2dx_head_inmouth_1",
 "2dy_head_inmouth_1",
 "visible_head_inmouth_1",
 "2dx_head_inmouth_2",
 "2dy_head_inmouth_2",
 "visible_head_inmouth_2",
 "2dx_head_inmouth_3",
 "2dy_head_inmouth_3",
 "visible_head_inmouth_3",
 "2dx_head_inmouth_4",
 "2dy_head_inmouth_4",
 "visible_head_inmouth_4",
 "2dx_head_inmouth_5",
 "2dy_head_inmouth_5",
 "visible_head_inmouth_5",
 "2dx_head_inmouth_6",
 "2dy_head_inmouth_6",
 "visible_head_inmouth_6",
 "2dx_head_inmouth_7",
 "2dy_head_inmouth_7",
 "visible_head_inmouth_7",
 "2dx_head_reye",
 "2dy_head_reye",
 "visible_head_reye",
 "2dx_head_leye",
 "2dy_head_leye",
 "visible_head_leye",
"END"
};


enum skeletonSerializedEnum
{
SKELETON_SERIALIZED_FRAMENUMBER,
SKELETON_SERIALIZED_SKELETONID,
SKELETON_SERIALIZED_TOTALSKELETONS,
SKELETON_SERIALIZED_2DX_HEAD,
SKELETON_SERIALIZED_2DY_HEAD,
SKELETON_SERIALIZED_VISIBLE_HEAD,
SKELETON_SERIALIZED_2DX_NECK,
SKELETON_SERIALIZED_2DY_NECK,
SKELETON_SERIALIZED_VISIBLE_NECK,
SKELETON_SERIALIZED_2DX_RSHOULDER,
SKELETON_SERIALIZED_2DY_RSHOULDER,
SKELETON_SERIALIZED_VISIBLE_RSHOULDER,
SKELETON_SERIALIZED_2DX_RELBOW,
SKELETON_SERIALIZED_2DY_RELBOW,
SKELETON_SERIALIZED_VISIBLE_RELBOW,
SKELETON_SERIALIZED_2DX_RHAND,
SKELETON_SERIALIZED_2DY_RHAND,
SKELETON_SERIALIZED_VISIBLE_RHAND,
SKELETON_SERIALIZED_2DX_LSHOULDER,
SKELETON_SERIALIZED_2DY_LSHOULDER,
SKELETON_SERIALIZED_VISIBLE_LSHOULDER,
SKELETON_SERIALIZED_2DX_LELBOW,
SKELETON_SERIALIZED_2DY_LELBOW,
SKELETON_SERIALIZED_VISIBLE_LELBOW,
SKELETON_SERIALIZED_2DX_LHAND,
SKELETON_SERIALIZED_2DY_LHAND,
SKELETON_SERIALIZED_VISIBLE_LHAND,
SKELETON_SERIALIZED_2DX_HIP,
SKELETON_SERIALIZED_2DY_HIP,
SKELETON_SERIALIZED_VISIBLE_HIP,
SKELETON_SERIALIZED_2DX_RHIP,
SKELETON_SERIALIZED_2DY_RHIP,
SKELETON_SERIALIZED_VISIBLE_RHIP,
SKELETON_SERIALIZED_2DX_RKNEE,
SKELETON_SERIALIZED_2DY_RKNEE,
SKELETON_SERIALIZED_VISIBLE_RKNEE,
SKELETON_SERIALIZED_2DX_RFOOT,
SKELETON_SERIALIZED_2DY_RFOOT,
SKELETON_SERIALIZED_VISIBLE_RFOOT,
SKELETON_SERIALIZED_2DX_LHIP,
SKELETON_SERIALIZED_2DY_LHIP,
SKELETON_SERIALIZED_VISIBLE_LHIP,
SKELETON_SERIALIZED_2DX_LKNEE,
SKELETON_SERIALIZED_2DY_LKNEE,
SKELETON_SERIALIZED_VISIBLE_LKNEE,
SKELETON_SERIALIZED_2DX_LFOOT,
SKELETON_SERIALIZED_2DY_LFOOT,
SKELETON_SERIALIZED_VISIBLE_LFOOT,
SKELETON_SERIALIZED_2DX_ENDSITE_EYE_R,
SKELETON_SERIALIZED_2DY_ENDSITE_EYE_R,
SKELETON_SERIALIZED_VISIBLE_ENDSITE_EYE_R,
SKELETON_SERIALIZED_2DX_ENDSITE_EYE_L,
SKELETON_SERIALIZED_2DY_ENDSITE_EYE_L,
SKELETON_SERIALIZED_VISIBLE_ENDSITE_EYE_L,
SKELETON_SERIALIZED_2DX_REAR,
SKELETON_SERIALIZED_2DY_REAR,
SKELETON_SERIALIZED_VISIBLE_REAR,
SKELETON_SERIALIZED_2DX_LEAR,
SKELETON_SERIALIZED_2DY_LEAR,
SKELETON_SERIALIZED_VISIBLE_LEAR,
SKELETON_SERIALIZED_2DX_ENDSITE_TOE1_2_L,
SKELETON_SERIALIZED_2DY_ENDSITE_TOE1_2_L,
SKELETON_SERIALIZED_VISIBLE_ENDSITE_TOE1_2_L,
SKELETON_SERIALIZED_2DX_ENDSITE_TOE5_3_L,
SKELETON_SERIALIZED_2DY_ENDSITE_TOE5_3_L,
SKELETON_SERIALIZED_VISIBLE_ENDSITE_TOE5_3_L,
SKELETON_SERIALIZED_2DX_LHEEL,
SKELETON_SERIALIZED_2DY_LHEEL,
SKELETON_SERIALIZED_VISIBLE_LHEEL,
SKELETON_SERIALIZED_2DX_ENDSITE_TOE1_2_R,
SKELETON_SERIALIZED_2DY_ENDSITE_TOE1_2_R,
SKELETON_SERIALIZED_VISIBLE_ENDSITE_TOE1_2_R,
SKELETON_SERIALIZED_2DX_ENDSITE_TOE5_3_R,
SKELETON_SERIALIZED_2DY_ENDSITE_TOE5_3_R,
SKELETON_SERIALIZED_VISIBLE_ENDSITE_TOE5_3_R,
SKELETON_SERIALIZED_2DX_RHEEL,
SKELETON_SERIALIZED_2DY_RHEEL,
SKELETON_SERIALIZED_VISIBLE_RHEEL,
SKELETON_SERIALIZED_2DX_BKG,
SKELETON_SERIALIZED_2DY_BKG,
SKELETON_SERIALIZED_VISIBLE_BKG,
SKELETON_SERIALIZED_2DX_LHAND__,
SKELETON_SERIALIZED_2DY_LHAND__,
SKELETON_SERIALIZED_VISIBLE_LHAND__,
SKELETON_SERIALIZED_2DX_LTHUMB,
SKELETON_SERIALIZED_2DY_LTHUMB,
SKELETON_SERIALIZED_VISIBLE_LTHUMB,
SKELETON_SERIALIZED_2DX_FINGER1_2_L,
SKELETON_SERIALIZED_2DY_FINGER1_2_L,
SKELETON_SERIALIZED_VISIBLE_FINGER1_2_L,
SKELETON_SERIALIZED_2DX_FINGER1_3_L,
SKELETON_SERIALIZED_2DY_FINGER1_3_L,
SKELETON_SERIALIZED_VISIBLE_FINGER1_3_L,
SKELETON_SERIALIZED_2DX_ENDSITE_FINGER1_3_L,
SKELETON_SERIALIZED_2DY_ENDSITE_FINGER1_3_L,
SKELETON_SERIALIZED_VISIBLE_ENDSITE_FINGER1_3_L,
SKELETON_SERIALIZED_2DX_FINGER2_1_L,
SKELETON_SERIALIZED_2DY_FINGER2_1_L,
SKELETON_SERIALIZED_VISIBLE_FINGER2_1_L,
SKELETON_SERIALIZED_2DX_FINGER2_2_L,
SKELETON_SERIALIZED_2DY_FINGER2_2_L,
SKELETON_SERIALIZED_VISIBLE_FINGER2_2_L,
SKELETON_SERIALIZED_2DX_FINGER2_3_L,
SKELETON_SERIALIZED_2DY_FINGER2_3_L,
SKELETON_SERIALIZED_VISIBLE_FINGER2_3_L,
SKELETON_SERIALIZED_2DX_ENDSITE_FINGER2_3_L,
SKELETON_SERIALIZED_2DY_ENDSITE_FINGER2_3_L,
SKELETON_SERIALIZED_VISIBLE_ENDSITE_FINGER2_3_L,
SKELETON_SERIALIZED_2DX_FINGER3_1_L,
SKELETON_SERIALIZED_2DY_FINGER3_1_L,
SKELETON_SERIALIZED_VISIBLE_FINGER3_1_L,
SKELETON_SERIALIZED_2DX_FINGER3_2_L,
SKELETON_SERIALIZED_2DY_FINGER3_2_L,
SKELETON_SERIALIZED_VISIBLE_FINGER3_2_L,
SKELETON_SERIALIZED_2DX_FINGER3_3_L,
SKELETON_SERIALIZED_2DY_FINGER3_3_L,
SKELETON_SERIALIZED_VISIBLE_FINGER3_3_L,
SKELETON_SERIALIZED_2DX_ENDSITE_FINGER3_3_L,
SKELETON_SERIALIZED_2DY_ENDSITE_FINGER3_3_L,
SKELETON_SERIALIZED_VISIBLE_ENDSITE_FINGER3_3_L,
SKELETON_SERIALIZED_2DX_FINGER4_1_L,
SKELETON_SERIALIZED_2DY_FINGER4_1_L,
SKELETON_SERIALIZED_VISIBLE_FINGER4_1_L,
SKELETON_SERIALIZED_2DX_FINGER4_2_L,
SKELETON_SERIALIZED_2DY_FINGER4_2_L,
SKELETON_SERIALIZED_VISIBLE_FINGER4_2_L,
SKELETON_SERIALIZED_2DX_FINGER4_3_L,
SKELETON_SERIALIZED_2DY_FINGER4_3_L,
SKELETON_SERIALIZED_VISIBLE_FINGER4_3_L,
SKELETON_SERIALIZED_2DX_ENDSITE_FINGER4_3_L,
SKELETON_SERIALIZED_2DY_ENDSITE_FINGER4_3_L,
SKELETON_SERIALIZED_VISIBLE_ENDSITE_FINGER4_3_L,
SKELETON_SERIALIZED_2DX_FINGER5_1_L,
SKELETON_SERIALIZED_2DY_FINGER5_1_L,
SKELETON_SERIALIZED_VISIBLE_FINGER5_1_L,
SKELETON_SERIALIZED_2DX_FINGER5_2_L,
SKELETON_SERIALIZED_2DY_FINGER5_2_L,
SKELETON_SERIALIZED_VISIBLE_FINGER5_2_L,
SKELETON_SERIALIZED_2DX_FINGER5_3_L,
SKELETON_SERIALIZED_2DY_FINGER5_3_L,
SKELETON_SERIALIZED_VISIBLE_FINGER5_3_L,
SKELETON_SERIALIZED_2DX_ENDSITE_FINGER5_3_L,
SKELETON_SERIALIZED_2DY_ENDSITE_FINGER5_3_L,
SKELETON_SERIALIZED_VISIBLE_ENDSITE_FINGER5_3_L,
SKELETON_SERIALIZED_2DX_RHAND__,
SKELETON_SERIALIZED_2DY_RHAND__,
SKELETON_SERIALIZED_VISIBLE_RHAND__,
SKELETON_SERIALIZED_2DX_RTHUMB,
SKELETON_SERIALIZED_2DY_RTHUMB,
SKELETON_SERIALIZED_VISIBLE_RTHUMB,
SKELETON_SERIALIZED_2DX_FINGER1_2_R,
SKELETON_SERIALIZED_2DY_FINGER1_2_R,
SKELETON_SERIALIZED_VISIBLE_FINGER1_2_R,
SKELETON_SERIALIZED_2DX_FINGER1_3_R,
SKELETON_SERIALIZED_2DY_FINGER1_3_R,
SKELETON_SERIALIZED_VISIBLE_FINGER1_3_R,
SKELETON_SERIALIZED_2DX_ENDSITE_FINGER1_3_R,
SKELETON_SERIALIZED_2DY_ENDSITE_FINGER1_3_R,
SKELETON_SERIALIZED_VISIBLE_ENDSITE_FINGER1_3_R,
SKELETON_SERIALIZED_2DX_FINGER2_1_R,
SKELETON_SERIALIZED_2DY_FINGER2_1_R,
SKELETON_SERIALIZED_VISIBLE_FINGER2_1_R,
SKELETON_SERIALIZED_2DX_FINGER2_2_R,
SKELETON_SERIALIZED_2DY_FINGER2_2_R,
SKELETON_SERIALIZED_VISIBLE_FINGER2_2_R,
SKELETON_SERIALIZED_2DX_FINGER2_3_R,
SKELETON_SERIALIZED_2DY_FINGER2_3_R,
SKELETON_SERIALIZED_VISIBLE_FINGER2_3_R,
SKELETON_SERIALIZED_2DX_ENDSITE_FINGER2_3_R,
SKELETON_SERIALIZED_2DY_ENDSITE_FINGER2_3_R,
SKELETON_SERIALIZED_VISIBLE_ENDSITE_FINGER2_3_R,
SKELETON_SERIALIZED_2DX_FINGER3_1_R,
SKELETON_SERIALIZED_2DY_FINGER3_1_R,
SKELETON_SERIALIZED_VISIBLE_FINGER3_1_R,
SKELETON_SERIALIZED_2DX_FINGER3_2_R,
SKELETON_SERIALIZED_2DY_FINGER3_2_R,
SKELETON_SERIALIZED_VISIBLE_FINGER3_2_R,
SKELETON_SERIALIZED_2DX_FINGER3_3_R,
SKELETON_SERIALIZED_2DY_FINGER3_3_R,
SKELETON_SERIALIZED_VISIBLE_FINGER3_3_R,
SKELETON_SERIALIZED_2DX_ENDSITE_FINGER3_3_R,
SKELETON_SERIALIZED_2DY_ENDSITE_FINGER3_3_R,
SKELETON_SERIALIZED_VISIBLE_ENDSITE_FINGER3_3_R,
SKELETON_SERIALIZED_2DX_FINGER4_1_R,
SKELETON_SERIALIZED_2DY_FINGER4_1_R,
SKELETON_SERIALIZED_VISIBLE_FINGER4_1_R,
SKELETON_SERIALIZED_2DX_FINGER4_2_R,
SKELETON_SERIALIZED_2DY_FINGER4_2_R,
SKELETON_SERIALIZED_VISIBLE_FINGER4_2_R,
SKELETON_SERIALIZED_2DX_FINGER4_3_R,
SKELETON_SERIALIZED_2DY_FINGER4_3_R,
SKELETON_SERIALIZED_VISIBLE_FINGER4_3_R,
SKELETON_SERIALIZED_2DX_ENDSITE_FINGER4_3_R,
SKELETON_SERIALIZED_2DY_ENDSITE_FINGER4_3_R,
SKELETON_SERIALIZED_VISIBLE_ENDSITE_FINGER4_3_R,
SKELETON_SERIALIZED_2DX_FINGER5_1_R,
SKELETON_SERIALIZED_2DY_FINGER5_1_R,
SKELETON_SERIALIZED_VISIBLE_FINGER5_1_R,
SKELETON_SERIALIZED_2DX_FINGER5_2_R,
SKELETON_SERIALIZED_2DY_FINGER5_2_R,
SKELETON_SERIALIZED_VISIBLE_FINGER5_2_R,
SKELETON_SERIALIZED_2DX_FINGER5_3_R,
SKELETON_SERIALIZED_2DY_FINGER5_3_R,
SKELETON_SERIALIZED_VISIBLE_FINGER5_3_R,
SKELETON_SERIALIZED_2DX_ENDSITE_FINGER5_3_R,
SKELETON_SERIALIZED_2DY_ENDSITE_FINGER5_3_R,
SKELETON_SERIALIZED_VISIBLE_ENDSITE_FINGER5_3_R,
SKELETON_SERIALIZED_2DX_HEAD_RCHIN_0,
SKELETON_SERIALIZED_2DY_HEAD_RCHIN_0,
SKELETON_SERIALIZED_VISIBLE_HEAD_RCHIN_0,
SKELETON_SERIALIZED_2DX_HEAD_RCHIN_1,
SKELETON_SERIALIZED_2DY_HEAD_RCHIN_1,
SKELETON_SERIALIZED_VISIBLE_HEAD_RCHIN_1,
SKELETON_SERIALIZED_2DX_HEAD_RCHIN_2,
SKELETON_SERIALIZED_2DY_HEAD_RCHIN_2,
SKELETON_SERIALIZED_VISIBLE_HEAD_RCHIN_2,
SKELETON_SERIALIZED_2DX_HEAD_RCHIN_3,
SKELETON_SERIALIZED_2DY_HEAD_RCHIN_3,
SKELETON_SERIALIZED_VISIBLE_HEAD_RCHIN_3,
SKELETON_SERIALIZED_2DX_HEAD_RCHIN_4,
SKELETON_SERIALIZED_2DY_HEAD_RCHIN_4,
SKELETON_SERIALIZED_VISIBLE_HEAD_RCHIN_4,
SKELETON_SERIALIZED_2DX_HEAD_RCHIN_5,
SKELETON_SERIALIZED_2DY_HEAD_RCHIN_5,
SKELETON_SERIALIZED_VISIBLE_HEAD_RCHIN_5,
SKELETON_SERIALIZED_2DX_HEAD_RCHIN_6,
SKELETON_SERIALIZED_2DY_HEAD_RCHIN_6,
SKELETON_SERIALIZED_VISIBLE_HEAD_RCHIN_6,
SKELETON_SERIALIZED_2DX_HEAD_RCHIN_7,
SKELETON_SERIALIZED_2DY_HEAD_RCHIN_7,
SKELETON_SERIALIZED_VISIBLE_HEAD_RCHIN_7,
SKELETON_SERIALIZED_2DX_HEAD_CHIN,
SKELETON_SERIALIZED_2DY_HEAD_CHIN,
SKELETON_SERIALIZED_VISIBLE_HEAD_CHIN,
SKELETON_SERIALIZED_2DX_HEAD_LCHIN_7,
SKELETON_SERIALIZED_2DY_HEAD_LCHIN_7,
SKELETON_SERIALIZED_VISIBLE_HEAD_LCHIN_7,
SKELETON_SERIALIZED_2DX_HEAD_LCHIN_6,
SKELETON_SERIALIZED_2DY_HEAD_LCHIN_6,
SKELETON_SERIALIZED_VISIBLE_HEAD_LCHIN_6,
SKELETON_SERIALIZED_2DX_HEAD_LCHIN_5,
SKELETON_SERIALIZED_2DY_HEAD_LCHIN_5,
SKELETON_SERIALIZED_VISIBLE_HEAD_LCHIN_5,
SKELETON_SERIALIZED_2DX_HEAD_LCHIN_4,
SKELETON_SERIALIZED_2DY_HEAD_LCHIN_4,
SKELETON_SERIALIZED_VISIBLE_HEAD_LCHIN_4,
SKELETON_SERIALIZED_2DX_HEAD_LCHIN_3,
SKELETON_SERIALIZED_2DY_HEAD_LCHIN_3,
SKELETON_SERIALIZED_VISIBLE_HEAD_LCHIN_3,
SKELETON_SERIALIZED_2DX_HEAD_LCHIN_2,
SKELETON_SERIALIZED_2DY_HEAD_LCHIN_2,
SKELETON_SERIALIZED_VISIBLE_HEAD_LCHIN_2,
SKELETON_SERIALIZED_2DX_HEAD_LCHIN_1,
SKELETON_SERIALIZED_2DY_HEAD_LCHIN_1,
SKELETON_SERIALIZED_VISIBLE_HEAD_LCHIN_1,
SKELETON_SERIALIZED_2DX_HEAD_LCHIN_0,
SKELETON_SERIALIZED_2DY_HEAD_LCHIN_0,
SKELETON_SERIALIZED_VISIBLE_HEAD_LCHIN_0,
SKELETON_SERIALIZED_2DX_HEAD_REYEBROW_0,
SKELETON_SERIALIZED_2DY_HEAD_REYEBROW_0,
SKELETON_SERIALIZED_VISIBLE_HEAD_REYEBROW_0,
SKELETON_SERIALIZED_2DX_HEAD_REYEBROW_1,
SKELETON_SERIALIZED_2DY_HEAD_REYEBROW_1,
SKELETON_SERIALIZED_VISIBLE_HEAD_REYEBROW_1,
SKELETON_SERIALIZED_2DX_HEAD_REYEBROW_2,
SKELETON_SERIALIZED_2DY_HEAD_REYEBROW_2,
SKELETON_SERIALIZED_VISIBLE_HEAD_REYEBROW_2,
SKELETON_SERIALIZED_2DX_HEAD_REYEBROW_3,
SKELETON_SERIALIZED_2DY_HEAD_REYEBROW_3,
SKELETON_SERIALIZED_VISIBLE_HEAD_REYEBROW_3,
SKELETON_SERIALIZED_2DX_HEAD_REYEBROW_4,
SKELETON_SERIALIZED_2DY_HEAD_REYEBROW_4,
SKELETON_SERIALIZED_VISIBLE_HEAD_REYEBROW_4,
SKELETON_SERIALIZED_2DX_HEAD_LEYEBROW_4,
SKELETON_SERIALIZED_2DY_HEAD_LEYEBROW_4,
SKELETON_SERIALIZED_VISIBLE_HEAD_LEYEBROW_4,
SKELETON_SERIALIZED_2DX_HEAD_LEYEBROW_3,
SKELETON_SERIALIZED_2DY_HEAD_LEYEBROW_3,
SKELETON_SERIALIZED_VISIBLE_HEAD_LEYEBROW_3,
SKELETON_SERIALIZED_2DX_HEAD_LEYEBROW_2,
SKELETON_SERIALIZED_2DY_HEAD_LEYEBROW_2,
SKELETON_SERIALIZED_VISIBLE_HEAD_LEYEBROW_2,
SKELETON_SERIALIZED_2DX_HEAD_LEYEBROW_1,
SKELETON_SERIALIZED_2DY_HEAD_LEYEBROW_1,
SKELETON_SERIALIZED_VISIBLE_HEAD_LEYEBROW_1,
SKELETON_SERIALIZED_2DX_HEAD_LEYEBROW_0,
SKELETON_SERIALIZED_2DY_HEAD_LEYEBROW_0,
SKELETON_SERIALIZED_VISIBLE_HEAD_LEYEBROW_0,
SKELETON_SERIALIZED_2DX_HEAD_NOSEBONE_0,
SKELETON_SERIALIZED_2DY_HEAD_NOSEBONE_0,
SKELETON_SERIALIZED_VISIBLE_HEAD_NOSEBONE_0,
SKELETON_SERIALIZED_2DX_HEAD_NOSEBONE_1,
SKELETON_SERIALIZED_2DY_HEAD_NOSEBONE_1,
SKELETON_SERIALIZED_VISIBLE_HEAD_NOSEBONE_1,
SKELETON_SERIALIZED_2DX_HEAD_NOSEBONE_2,
SKELETON_SERIALIZED_2DY_HEAD_NOSEBONE_2,
SKELETON_SERIALIZED_VISIBLE_HEAD_NOSEBONE_2,
SKELETON_SERIALIZED_2DX_HEAD_NOSEBONE_3,
SKELETON_SERIALIZED_2DY_HEAD_NOSEBONE_3,
SKELETON_SERIALIZED_VISIBLE_HEAD_NOSEBONE_3,
SKELETON_SERIALIZED_2DX_HEAD_NOSTRILLS_0,
SKELETON_SERIALIZED_2DY_HEAD_NOSTRILLS_0,
SKELETON_SERIALIZED_VISIBLE_HEAD_NOSTRILLS_0,
SKELETON_SERIALIZED_2DX_HEAD_NOSTRILLS_1,
SKELETON_SERIALIZED_2DY_HEAD_NOSTRILLS_1,
SKELETON_SERIALIZED_VISIBLE_HEAD_NOSTRILLS_1,
SKELETON_SERIALIZED_2DX_HEAD_NOSTRILLS_2,
SKELETON_SERIALIZED_2DY_HEAD_NOSTRILLS_2,
SKELETON_SERIALIZED_VISIBLE_HEAD_NOSTRILLS_2,
SKELETON_SERIALIZED_2DX_HEAD_NOSTRILLS_3,
SKELETON_SERIALIZED_2DY_HEAD_NOSTRILLS_3,
SKELETON_SERIALIZED_VISIBLE_HEAD_NOSTRILLS_3,
SKELETON_SERIALIZED_2DX_HEAD_NOSTRILLS_4,
SKELETON_SERIALIZED_2DY_HEAD_NOSTRILLS_4,
SKELETON_SERIALIZED_VISIBLE_HEAD_NOSTRILLS_4,
SKELETON_SERIALIZED_2DX_HEAD_REYE_0,
SKELETON_SERIALIZED_2DY_HEAD_REYE_0,
SKELETON_SERIALIZED_VISIBLE_HEAD_REYE_0,
SKELETON_SERIALIZED_2DX_HEAD_REYE_1,
SKELETON_SERIALIZED_2DY_HEAD_REYE_1,
SKELETON_SERIALIZED_VISIBLE_HEAD_REYE_1,
SKELETON_SERIALIZED_2DX_HEAD_REYE_2,
SKELETON_SERIALIZED_2DY_HEAD_REYE_2,
SKELETON_SERIALIZED_VISIBLE_HEAD_REYE_2,
SKELETON_SERIALIZED_2DX_HEAD_REYE_3,
SKELETON_SERIALIZED_2DY_HEAD_REYE_3,
SKELETON_SERIALIZED_VISIBLE_HEAD_REYE_3,
SKELETON_SERIALIZED_2DX_HEAD_REYE_4,
SKELETON_SERIALIZED_2DY_HEAD_REYE_4,
SKELETON_SERIALIZED_VISIBLE_HEAD_REYE_4,
SKELETON_SERIALIZED_2DX_HEAD_REYE_5,
SKELETON_SERIALIZED_2DY_HEAD_REYE_5,
SKELETON_SERIALIZED_VISIBLE_HEAD_REYE_5,
SKELETON_SERIALIZED_2DX_HEAD_LEYE_0,
SKELETON_SERIALIZED_2DY_HEAD_LEYE_0,
SKELETON_SERIALIZED_VISIBLE_HEAD_LEYE_0,
SKELETON_SERIALIZED_2DX_HEAD_LEYE_1,
SKELETON_SERIALIZED_2DY_HEAD_LEYE_1,
SKELETON_SERIALIZED_VISIBLE_HEAD_LEYE_1,
SKELETON_SERIALIZED_2DX_HEAD_LEYE_2,
SKELETON_SERIALIZED_2DY_HEAD_LEYE_2,
SKELETON_SERIALIZED_VISIBLE_HEAD_LEYE_2,
SKELETON_SERIALIZED_2DX_HEAD_LEYE_3,
SKELETON_SERIALIZED_2DY_HEAD_LEYE_3,
SKELETON_SERIALIZED_VISIBLE_HEAD_LEYE_3,
SKELETON_SERIALIZED_2DX_HEAD_LEYE_4,
SKELETON_SERIALIZED_2DY_HEAD_LEYE_4,
SKELETON_SERIALIZED_VISIBLE_HEAD_LEYE_4,
SKELETON_SERIALIZED_2DX_HEAD_LEYE_5,
SKELETON_SERIALIZED_2DY_HEAD_LEYE_5,
SKELETON_SERIALIZED_VISIBLE_HEAD_LEYE_5,
SKELETON_SERIALIZED_2DX_HEAD_OUTMOUTH_0,
SKELETON_SERIALIZED_2DY_HEAD_OUTMOUTH_0,
SKELETON_SERIALIZED_VISIBLE_HEAD_OUTMOUTH_0,
SKELETON_SERIALIZED_2DX_HEAD_OUTMOUTH_1,
SKELETON_SERIALIZED_2DY_HEAD_OUTMOUTH_1,
SKELETON_SERIALIZED_VISIBLE_HEAD_OUTMOUTH_1,
SKELETON_SERIALIZED_2DX_HEAD_OUTMOUTH_2,
SKELETON_SERIALIZED_2DY_HEAD_OUTMOUTH_2,
SKELETON_SERIALIZED_VISIBLE_HEAD_OUTMOUTH_2,
SKELETON_SERIALIZED_2DX_HEAD_OUTMOUTH_3,
SKELETON_SERIALIZED_2DY_HEAD_OUTMOUTH_3,
SKELETON_SERIALIZED_VISIBLE_HEAD_OUTMOUTH_3,
SKELETON_SERIALIZED_2DX_HEAD_OUTMOUTH_4,
SKELETON_SERIALIZED_2DY_HEAD_OUTMOUTH_4,
SKELETON_SERIALIZED_VISIBLE_HEAD_OUTMOUTH_4,
SKELETON_SERIALIZED_2DX_HEAD_OUTMOUTH_5,
SKELETON_SERIALIZED_2DY_HEAD_OUTMOUTH_5,
SKELETON_SERIALIZED_VISIBLE_HEAD_OUTMOUTH_5,
SKELETON_SERIALIZED_2DX_HEAD_OUTMOUTH_6,
SKELETON_SERIALIZED_2DY_HEAD_OUTMOUTH_6,
SKELETON_SERIALIZED_VISIBLE_HEAD_OUTMOUTH_6,
SKELETON_SERIALIZED_2DX_HEAD_OUTMOUTH_7,
SKELETON_SERIALIZED_2DY_HEAD_OUTMOUTH_7,
SKELETON_SERIALIZED_VISIBLE_HEAD_OUTMOUTH_7,
SKELETON_SERIALIZED_2DX_HEAD_OUTMOUTH_8,
SKELETON_SERIALIZED_2DY_HEAD_OUTMOUTH_8,
SKELETON_SERIALIZED_VISIBLE_HEAD_OUTMOUTH_8,
SKELETON_SERIALIZED_2DX_HEAD_OUTMOUTH_9,
SKELETON_SERIALIZED_2DY_HEAD_OUTMOUTH_9,
SKELETON_SERIALIZED_VISIBLE_HEAD_OUTMOUTH_9,
SKELETON_SERIALIZED_2DX_HEAD_OUTMOUTH_10,
SKELETON_SERIALIZED_2DY_HEAD_OUTMOUTH_10,
SKELETON_SERIALIZED_VISIBLE_HEAD_OUTMOUTH_10,
SKELETON_SERIALIZED_2DX_HEAD_OUTMOUTH_11,
SKELETON_SERIALIZED_2DY_HEAD_OUTMOUTH_11,
SKELETON_SERIALIZED_VISIBLE_HEAD_OUTMOUTH_11,
SKELETON_SERIALIZED_2DX_HEAD_INMOUTH_0,
SKELETON_SERIALIZED_2DY_HEAD_INMOUTH_0,
SKELETON_SERIALIZED_VISIBLE_HEAD_INMOUTH_0,
SKELETON_SERIALIZED_2DX_HEAD_INMOUTH_1,
SKELETON_SERIALIZED_2DY_HEAD_INMOUTH_1,
SKELETON_SERIALIZED_VISIBLE_HEAD_INMOUTH_1,
SKELETON_SERIALIZED_2DX_HEAD_INMOUTH_2,
SKELETON_SERIALIZED_2DY_HEAD_INMOUTH_2,
SKELETON_SERIALIZED_VISIBLE_HEAD_INMOUTH_2,
SKELETON_SERIALIZED_2DX_HEAD_INMOUTH_3,
SKELETON_SERIALIZED_2DY_HEAD_INMOUTH_3,
SKELETON_SERIALIZED_VISIBLE_HEAD_INMOUTH_3,
SKELETON_SERIALIZED_2DX_HEAD_INMOUTH_4,
SKELETON_SERIALIZED_2DY_HEAD_INMOUTH_4,
SKELETON_SERIALIZED_VISIBLE_HEAD_INMOUTH_4,
SKELETON_SERIALIZED_2DX_HEAD_INMOUTH_5,
SKELETON_SERIALIZED_2DY_HEAD_INMOUTH_5,
SKELETON_SERIALIZED_VISIBLE_HEAD_INMOUTH_5,
SKELETON_SERIALIZED_2DX_HEAD_INMOUTH_6,
SKELETON_SERIALIZED_2DY_HEAD_INMOUTH_6,
SKELETON_SERIALIZED_VISIBLE_HEAD_INMOUTH_6,
SKELETON_SERIALIZED_2DX_HEAD_INMOUTH_7,
SKELETON_SERIALIZED_2DY_HEAD_INMOUTH_7,
SKELETON_SERIALIZED_VISIBLE_HEAD_INMOUTH_7,
SKELETON_SERIALIZED_2DX_HEAD_REYE,
SKELETON_SERIALIZED_2DY_HEAD_REYE,
SKELETON_SERIALIZED_VISIBLE_HEAD_REYE,
SKELETON_SERIALIZED_2DX_HEAD_LEYE,
SKELETON_SERIALIZED_2DY_HEAD_LEYE,
SKELETON_SERIALIZED_VISIBLE_HEAD_LEYE,
//------------------------------------
SKELETON_SERIALIZED_LENGTH
};


static const char * bvhMotionNames[]=
{
 "hip",
 "abdomen",
 "chest",
 "neck",
 "neck1",
 "head",
 "__jaw",
 "jaw",
 "special04",
 "oris02",
 "oris01",
 "EndSite_oris01",
 "oris06.l",
 "oris07.l",
 "EndSite_oris07.l",
 "oris06.r",
 "oris07.r",
 "EndSite_oris07.r",
 "tongue00",
 "tongue01",
 "tongue02",
 "tongue03",
 "__tongue04",
 "tongue04",
 "EndSite_tongue04",
 "tongue07.l",
 "EndSite_tongue07.l",
 "tongue07.r",
 "EndSite_tongue07.r",
 "tongue06.l",
 "EndSite_tongue06.l",
 "tongue06.r",
 "EndSite_tongue06.r",
 "tongue05.l",
 "EndSite_tongue05.l",
 "tongue05.r",
 "EndSite_tongue05.r",
 "__levator02.l",
 "levator02.l",
 "levator03.l",
 "levator04.l",
 "levator05.l",
 "EndSite_levator05.l",
 "__levator02.r",
 "levator02.r",
 "levator03.r",
 "levator04.r",
 "levator05.r",
 "EndSite_levator05.r",
 "__special01",
 "special01",
 "oris04.l",
 "oris03.l",
 "EndSite_oris03.l",
 "oris04.r",
 "oris03.r",
 "EndSite_oris03.r",
 "oris06",
 "oris05",
 "EndSite_oris05",
 "__special03",
 "special03",
 "__levator06.l",
 "levator06.l",
 "EndSite_levator06.l",
 "__levator06.r",
 "levator06.r",
 "EndSite_levator06.r",
 "special06.l",
 "special05.l",
 "eye.l",
 "EndSite_eye.l",
 "orbicularis03.l",
 "EndSite_orbicularis03.l",
 "orbicularis04.l",
 "EndSite_orbicularis04.l",
 "special06.r",
 "special05.r",
 "eye.r",
 "EndSite_eye.r",
 "orbicularis03.r",
 "EndSite_orbicularis03.r",
 "orbicularis04.r",
 "EndSite_orbicularis04.r",
 "__temporalis01.l",
 "temporalis01.l",
 "oculi02.l",
 "oculi01.l",
 "EndSite_oculi01.l",
 "__temporalis01.r",
 "temporalis01.r",
 "oculi02.r",
 "oculi01.r",
 "EndSite_oculi01.r",
 "__temporalis02.l",
 "temporalis02.l",
 "risorius02.l",
 "risorius03.l",
 "EndSite_risorius03.l",
 "__temporalis02.r",
 "temporalis02.r",
 "risorius02.r",
 "risorius03.r",
 "EndSite_risorius03.r",
 "rCollar",
 "rShldr",
 "rForeArm",
 "rHand",
 "metacarpal1.r",
 "finger2-1.r",
 "finger2-2.r",
 "finger2-3.r",
 "EndSite_finger2-3.r",
 "metacarpal2.r",
 "finger3-1.r",
 "finger3-2.r",
 "finger3-3.r",
 "EndSite_finger3-3.r",
 "__metacarpal3.r",
 "metacarpal3.r",
 "finger4-1.r",
 "finger4-2.r",
 "finger4-3.r",
 "EndSite_finger4-3.r",
 "__metacarpal4.r",
 "metacarpal4.r",
 "finger5-1.r",
 "finger5-2.r",
 "finger5-3.r",
 "EndSite_finger5-3.r",
 "__rthumb",
 "rthumb",
 "finger1-2.r",
 "finger1-3.r",
 "EndSite_finger1-3.r",
 "lCollar",
 "lShldr",
 "lForeArm",
 "lHand",
 "metacarpal1.l",
 "finger2-1.l",
 "finger2-2.l",
 "finger2-3.l",
 "EndSite_finger2-3.l",
 "metacarpal2.l",
 "finger3-1.l",
 "finger3-2.l",
 "finger3-3.l",
 "EndSite_finger3-3.l",
 "__metacarpal3.l",
 "metacarpal3.l",
 "finger4-1.l",
 "finger4-2.l",
 "finger4-3.l",
 "EndSite_finger4-3.l",
 "__metacarpal4.l",
 "metacarpal4.l",
 "finger5-1.l",
 "finger5-2.l",
 "finger5-3.l",
 "EndSite_finger5-3.l",
 "__lthumb",
 "lthumb",
 "finger1-2.l",
 "finger1-3.l",
 "EndSite_finger1-3.l",
 "rButtock",
 "rThigh",
 "rShin",
 "rFoot",
 "toe1-1.R",
 "toe1-2.R",
 "EndSite_toe1-2.R",
 "toe2-1.R",
 "toe2-2.R",
 "toe2-3.R",
 "EndSite_toe2-3.R",
 "toe3-1.R",
 "toe3-2.R",
 "toe3-3.R",
 "EndSite_toe3-3.R",
 "toe4-1.R",
 "toe4-2.R",
 "toe4-3.R",
 "EndSite_toe4-3.R",
 "toe5-1.R",
 "toe5-2.R",
 "toe5-3.R",
 "EndSite_toe5-3.R",
 "lButtock",
 "lThigh",
 "lShin",
 "lFoot",
 "toe1-1.L",
 "toe1-2.L",
 "EndSite_toe1-2.L",
 "toe2-1.L",
 "toe2-2.L",
 "toe2-3.L",
 "EndSite_toe2-3.L",
 "toe3-1.L",
 "toe3-2.L",
 "toe3-3.L",
 "EndSite_toe3-3.L",
 "toe4-1.L",
 "toe4-2.L",
 "toe4-3.L",
 "EndSite_toe4-3.L",
 "toe5-1.L",
 "toe5-2.L",
 "toe5-3.L",
 "EndSite_toe5-3.L",
"END"
};


enum bvhMotionEnum
{
BVH_MOTION_HIP, //0/212
BVH_MOTION_ABDOMEN, //1/212
BVH_MOTION_CHEST, //2/212
BVH_MOTION_NECK, //3/212
BVH_MOTION_NECK1, //4/212
BVH_MOTION_HEAD, //5/212
BVH_MOTION___JAW, //6/212
BVH_MOTION_JAW, //7/212
BVH_MOTION_SPECIAL04, //8/212
BVH_MOTION_ORIS02, //9/212
BVH_MOTION_ORIS01, //10/212
BVH_MOTION_ENDSITE_ORIS01, //11/212
BVH_MOTION_ORIS06_L, //12/212
BVH_MOTION_ORIS07_L, //13/212
BVH_MOTION_ENDSITE_ORIS07_L, //14/212
BVH_MOTION_ORIS06_R, //15/212
BVH_MOTION_ORIS07_R, //16/212
BVH_MOTION_ENDSITE_ORIS07_R, //17/212
BVH_MOTION_TONGUE00, //18/212
BVH_MOTION_TONGUE01, //19/212
BVH_MOTION_TONGUE02, //20/212
BVH_MOTION_TONGUE03, //21/212
BVH_MOTION___TONGUE04, //22/212
BVH_MOTION_TONGUE04, //23/212
BVH_MOTION_ENDSITE_TONGUE04, //24/212
BVH_MOTION_TONGUE07_L, //25/212
BVH_MOTION_ENDSITE_TONGUE07_L, //26/212
BVH_MOTION_TONGUE07_R, //27/212
BVH_MOTION_ENDSITE_TONGUE07_R, //28/212
BVH_MOTION_TONGUE06_L, //29/212
BVH_MOTION_ENDSITE_TONGUE06_L, //30/212
BVH_MOTION_TONGUE06_R, //31/212
BVH_MOTION_ENDSITE_TONGUE06_R, //32/212
BVH_MOTION_TONGUE05_L, //33/212
BVH_MOTION_ENDSITE_TONGUE05_L, //34/212
BVH_MOTION_TONGUE05_R, //35/212
BVH_MOTION_ENDSITE_TONGUE05_R, //36/212
BVH_MOTION___LEVATOR02_L, //37/212
BVH_MOTION_LEVATOR02_L, //38/212
BVH_MOTION_LEVATOR03_L, //39/212
BVH_MOTION_LEVATOR04_L, //40/212
BVH_MOTION_LEVATOR05_L, //41/212
BVH_MOTION_ENDSITE_LEVATOR05_L, //42/212
BVH_MOTION___LEVATOR02_R, //43/212
BVH_MOTION_LEVATOR02_R, //44/212
BVH_MOTION_LEVATOR03_R, //45/212
BVH_MOTION_LEVATOR04_R, //46/212
BVH_MOTION_LEVATOR05_R, //47/212
BVH_MOTION_ENDSITE_LEVATOR05_R, //48/212
BVH_MOTION___SPECIAL01, //49/212
BVH_MOTION_SPECIAL01, //50/212
BVH_MOTION_ORIS04_L, //51/212
BVH_MOTION_ORIS03_L, //52/212
BVH_MOTION_ENDSITE_ORIS03_L, //53/212
BVH_MOTION_ORIS04_R, //54/212
BVH_MOTION_ORIS03_R, //55/212
BVH_MOTION_ENDSITE_ORIS03_R, //56/212
BVH_MOTION_ORIS06, //57/212
BVH_MOTION_ORIS05, //58/212
BVH_MOTION_ENDSITE_ORIS05, //59/212
BVH_MOTION___SPECIAL03, //60/212
BVH_MOTION_SPECIAL03, //61/212
BVH_MOTION___LEVATOR06_L, //62/212
BVH_MOTION_LEVATOR06_L, //63/212
BVH_MOTION_ENDSITE_LEVATOR06_L, //64/212
BVH_MOTION___LEVATOR06_R, //65/212
BVH_MOTION_LEVATOR06_R, //66/212
BVH_MOTION_ENDSITE_LEVATOR06_R, //67/212
BVH_MOTION_SPECIAL06_L, //68/212
BVH_MOTION_SPECIAL05_L, //69/212
BVH_MOTION_EYE_L, //70/212
BVH_MOTION_ENDSITE_EYE_L, //71/212
BVH_MOTION_ORBICULARIS03_L, //72/212
BVH_MOTION_ENDSITE_ORBICULARIS03_L, //73/212
BVH_MOTION_ORBICULARIS04_L, //74/212
BVH_MOTION_ENDSITE_ORBICULARIS04_L, //75/212
BVH_MOTION_SPECIAL06_R, //76/212
BVH_MOTION_SPECIAL05_R, //77/212
BVH_MOTION_EYE_R, //78/212
BVH_MOTION_ENDSITE_EYE_R, //79/212
BVH_MOTION_ORBICULARIS03_R, //80/212
BVH_MOTION_ENDSITE_ORBICULARIS03_R, //81/212
BVH_MOTION_ORBICULARIS04_R, //82/212
BVH_MOTION_ENDSITE_ORBICULARIS04_R, //83/212
BVH_MOTION___TEMPORALIS01_L, //84/212
BVH_MOTION_TEMPORALIS01_L, //85/212
BVH_MOTION_OCULI02_L, //86/212
BVH_MOTION_OCULI01_L, //87/212
BVH_MOTION_ENDSITE_OCULI01_L, //88/212
BVH_MOTION___TEMPORALIS01_R, //89/212
BVH_MOTION_TEMPORALIS01_R, //90/212
BVH_MOTION_OCULI02_R, //91/212
BVH_MOTION_OCULI01_R, //92/212
BVH_MOTION_ENDSITE_OCULI01_R, //93/212
BVH_MOTION___TEMPORALIS02_L, //94/212
BVH_MOTION_TEMPORALIS02_L, //95/212
BVH_MOTION_RISORIUS02_L, //96/212
BVH_MOTION_RISORIUS03_L, //97/212
BVH_MOTION_ENDSITE_RISORIUS03_L, //98/212
BVH_MOTION___TEMPORALIS02_R, //99/212
BVH_MOTION_TEMPORALIS02_R, //100/212
BVH_MOTION_RISORIUS02_R, //101/212
BVH_MOTION_RISORIUS03_R, //102/212
BVH_MOTION_ENDSITE_RISORIUS03_R, //103/212
BVH_MOTION_RCOLLAR, //104/212
BVH_MOTION_RSHLDR, //105/212
BVH_MOTION_RFOREARM, //106/212
BVH_MOTION_RHAND, //107/212
BVH_MOTION_METACARPAL1_R, //108/212
BVH_MOTION_FINGER2_1_R, //109/212
BVH_MOTION_FINGER2_2_R, //110/212
BVH_MOTION_FINGER2_3_R, //111/212
BVH_MOTION_ENDSITE_FINGER2_3_R, //112/212
BVH_MOTION_METACARPAL2_R, //113/212
BVH_MOTION_FINGER3_1_R, //114/212
BVH_MOTION_FINGER3_2_R, //115/212
BVH_MOTION_FINGER3_3_R, //116/212
BVH_MOTION_ENDSITE_FINGER3_3_R, //117/212
BVH_MOTION___METACARPAL3_R, //118/212
BVH_MOTION_METACARPAL3_R, //119/212
BVH_MOTION_FINGER4_1_R, //120/212
BVH_MOTION_FINGER4_2_R, //121/212
BVH_MOTION_FINGER4_3_R, //122/212
BVH_MOTION_ENDSITE_FINGER4_3_R, //123/212
BVH_MOTION___METACARPAL4_R, //124/212
BVH_MOTION_METACARPAL4_R, //125/212
BVH_MOTION_FINGER5_1_R, //126/212
BVH_MOTION_FINGER5_2_R, //127/212
BVH_MOTION_FINGER5_3_R, //128/212
BVH_MOTION_ENDSITE_FINGER5_3_R, //129/212
BVH_MOTION___RTHUMB, //130/212
BVH_MOTION_RTHUMB, //131/212
BVH_MOTION_FINGER1_2_R, //132/212
BVH_MOTION_FINGER1_3_R, //133/212
BVH_MOTION_ENDSITE_FINGER1_3_R, //134/212
BVH_MOTION_LCOLLAR, //135/212
BVH_MOTION_LSHLDR, //136/212
BVH_MOTION_LFOREARM, //137/212
BVH_MOTION_LHAND, //138/212
BVH_MOTION_METACARPAL1_L, //139/212
BVH_MOTION_FINGER2_1_L, //140/212
BVH_MOTION_FINGER2_2_L, //141/212
BVH_MOTION_FINGER2_3_L, //142/212
BVH_MOTION_ENDSITE_FINGER2_3_L, //143/212
BVH_MOTION_METACARPAL2_L, //144/212
BVH_MOTION_FINGER3_1_L, //145/212
BVH_MOTION_FINGER3_2_L, //146/212
BVH_MOTION_FINGER3_3_L, //147/212
BVH_MOTION_ENDSITE_FINGER3_3_L, //148/212
BVH_MOTION___METACARPAL3_L, //149/212
BVH_MOTION_METACARPAL3_L, //150/212
BVH_MOTION_FINGER4_1_L, //151/212
BVH_MOTION_FINGER4_2_L, //152/212
BVH_MOTION_FINGER4_3_L, //153/212
BVH_MOTION_ENDSITE_FINGER4_3_L, //154/212
BVH_MOTION___METACARPAL4_L, //155/212
BVH_MOTION_METACARPAL4_L, //156/212
BVH_MOTION_FINGER5_1_L, //157/212
BVH_MOTION_FINGER5_2_L, //158/212
BVH_MOTION_FINGER5_3_L, //159/212
BVH_MOTION_ENDSITE_FINGER5_3_L, //160/212
BVH_MOTION___LTHUMB, //161/212
BVH_MOTION_LTHUMB, //162/212
BVH_MOTION_FINGER1_2_L, //163/212
BVH_MOTION_FINGER1_3_L, //164/212
BVH_MOTION_ENDSITE_FINGER1_3_L, //165/212
BVH_MOTION_RBUTTOCK, //166/212
BVH_MOTION_RTHIGH, //167/212
BVH_MOTION_RSHIN, //168/212
BVH_MOTION_RFOOT, //169/212
BVH_MOTION_TOE1_1_R, //170/212
BVH_MOTION_TOE1_2_R, //171/212
BVH_MOTION_ENDSITE_TOE1_2_R, //172/212
BVH_MOTION_TOE2_1_R, //173/212
BVH_MOTION_TOE2_2_R, //174/212
BVH_MOTION_TOE2_3_R, //175/212
BVH_MOTION_ENDSITE_TOE2_3_R, //176/212
BVH_MOTION_TOE3_1_R, //177/212
BVH_MOTION_TOE3_2_R, //178/212
BVH_MOTION_TOE3_3_R, //179/212
BVH_MOTION_ENDSITE_TOE3_3_R, //180/212
BVH_MOTION_TOE4_1_R, //181/212
BVH_MOTION_TOE4_2_R, //182/212
BVH_MOTION_TOE4_3_R, //183/212
BVH_MOTION_ENDSITE_TOE4_3_R, //184/212
BVH_MOTION_TOE5_1_R, //185/212
BVH_MOTION_TOE5_2_R, //186/212
BVH_MOTION_TOE5_3_R, //187/212
BVH_MOTION_ENDSITE_TOE5_3_R, //188/212
BVH_MOTION_LBUTTOCK, //189/212
BVH_MOTION_LTHIGH, //190/212
BVH_MOTION_LSHIN, //191/212
BVH_MOTION_LFOOT, //192/212
BVH_MOTION_TOE1_1_L, //193/212
BVH_MOTION_TOE1_2_L, //194/212
BVH_MOTION_ENDSITE_TOE1_2_L, //195/212
BVH_MOTION_TOE2_1_L, //196/212
BVH_MOTION_TOE2_2_L, //197/212
BVH_MOTION_TOE2_3_L, //198/212
BVH_MOTION_ENDSITE_TOE2_3_L, //199/212
BVH_MOTION_TOE3_1_L, //200/212
BVH_MOTION_TOE3_2_L, //201/212
BVH_MOTION_TOE3_3_L, //202/212
BVH_MOTION_ENDSITE_TOE3_3_L, //203/212
BVH_MOTION_TOE4_1_L, //204/212
BVH_MOTION_TOE4_2_L, //205/212
BVH_MOTION_TOE4_3_L, //206/212
BVH_MOTION_ENDSITE_TOE4_3_L, //207/212
BVH_MOTION_TOE5_1_L, //208/212
BVH_MOTION_TOE5_2_L, //209/212
BVH_MOTION_TOE5_3_L, //210/212
BVH_MOTION_ENDSITE_TOE5_3_L, //211/212
BVH_MOTION_LENGTH
};


void convertStringToCFriendly(char * str)
{
  if (str==0) { return;}   
  while (*str!=0)
  {
    switch (*str)
    {
       case '-' :  
       case '.' :  
       case '_' :  
       *str='_';
       break;
       
       default : 
       *str=toupper(*str);
    };
    ++str;
  } 
    
}



static int dumpSkeletonSerializedToBVHTransformCode(
    struct BVH_MotionCapture * bvhMotion,
    struct BVH_Transform * outputTransform,
    struct skeletonSerialized * inputPoints2D
)
{
    if (bvhMotion==0) { return 0; }
    if (bvhMotion->jointHierarchySize==0) { return 0; }
    
    FILE * fp = fopen("conversionCode.hpp","w");
 
    if (fp!=0)
        {  

            fprintf(fp,"\n\nstatic const char * skeletonSerializedNames[]=\n");
            fprintf(fp,"{\n");
            for (unsigned int jID=0; jID<inputPoints2D->skeletonHeaderElements; jID++)
                {
                    fprintf(fp," \"%s\",\n",inputPoints2D->skeletonHeader[jID].str);
                }
            fprintf(fp,"\"END\"\n");
            fprintf(fp,"};\n");
            
            
             
            fprintf(fp,"\n\nenum skeletonSerializedEnum\n");
            fprintf(fp,"{\n");
            
            char C_FriendlyLabel[1025]={0};
            for (unsigned int jID=0; jID<inputPoints2D->skeletonHeaderElements; jID++)
                {
                    snprintf(C_FriendlyLabel,1024,"%s",inputPoints2D->skeletonHeader[jID].str);
                    convertStringToCFriendly(C_FriendlyLabel);

                    fprintf(fp,"SKELETON_SERIALIZED_%s,\n",C_FriendlyLabel);   
                }
            fprintf(fp,"SKELETON_SERIALIZED_LENGTH\n");                 
            fprintf(fp,"};\n");
             
            //------------------------------------------------------------
            //------------------------------------------------------------
            //------------------------------------------------------------

            fprintf(fp,"\n\nstatic const char * bvhMotionNames[]=\n");
            fprintf(fp,"{\n");
            for (unsigned int jID=0; jID<bvhMotion->jointHierarchySize; jID++)
                {
                    fprintf(fp," \"%s\",\n",bvhMotion->jointHierarchy[jID].jointName);
                }
            fprintf(fp,"\"END\"\n");
            fprintf(fp,"};\n");


            fprintf(fp,"\n\nenum bvhMotionEnum\n");
            fprintf(fp,"{\n");
             
            for (unsigned int jID=0; jID<bvhMotion->jointHierarchySize; jID++)
                {
                    snprintf(C_FriendlyLabel,1024,"%s",bvhMotion->jointHierarchy[jID].jointName);
                    convertStringToCFriendly(C_FriendlyLabel);

                    fprintf(fp,"BVH_MOTION_%s, //%u/%u\n",C_FriendlyLabel,jID,bvhMotion->jointHierarchySize);   
                }
            fprintf(fp,"BVH_MOTION_LENGTH\n");                 
            fprintf(fp,"};\n");
             
            //------------------------------------------------------------
            //------------------------------------------------------------
            //------------------------------------------------------------
            fclose(fp);

            fprintf(stderr,"conversionCode.hpp exported..!!!\n");
            exit(0);
        }







    return 0;
}
